<div class="modal-header">
	<h4 class="modal-title">上传样式</h4>
</div>
<div class="modal-body container-fluid form-horizontal">
	<iframe name="iframe_0" style="position:absolute;top:-9999px">
	</iframe>
	<form name="form" novalidate method="post" enctype="multipart/form-data" target="iframe_0" action="../instance/uploadXml" >
		<input type="hidden" ng-value="item.sceneId" name="sceneId" required/>
		<div class="form-group" ng-if="!item.id">
			<label class="col-xs-3 control-label required">导入到：</label>
			<div class="col-xs-8">
				<tree-selector  node-list="filteredSceneTree" need=true leaf-only=true host="item" host-key="'sceneId'" host-text="'sceneName'"  tip-text="'场景选择'"></tree-selector>
			</div>
		</div>
		<div class="form-group" >
			<label class="col-xs-3 control-label required">名称：</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" ng-model="item.name" name="name" required
					   uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="name" api="../instance/checkUniqueName_mute"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-xs-3 control-label required">图标文件夹：</label>
			<div class="col-xs-8">
				<input type="hidden" value="{{item.folderId}}" name="folderId" >
				<select class="form-control" ng-model="item.folderId"  required
						ng-options="o.id as o.text for o in $root.folderList">
					<option value="">--请选择--</option></select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-3 control-label required">描述：</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" ng-model="item.comment" name="comment"   required/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-3 control-label required">xml文件：</label>
			<div class="col-xs-8 mt7">
				<input type="file" name="file" id="xmlInput" accept="text/xml, application/xml" required>
			</div>
		</div>
	</form>
</div>
<div class="modal-footer">
	<button class="btn btn-primary" ng-click="save(form)">确定</button>
	<button class="btn btn-warning" ng-click="$dismiss()">取消</button>
</div>
